Filter hook 'get_{$adjacent}_post_join'
in WP Core File wp-includes/link-template.php at line 1945
Description
Filters the JOIN clause in the SQL for an adjacent post query. The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include: - `get_next_post_join` - `get_previous_post_join`
Occurrences
Filename |
Line Number |
wp-includes/link-template.php |
1945 |
Parameters
Type |
Name |
Description |
string |
$join |
The JOIN clause in the SQL. |
bool |
$in_same_term |
Whether post should be in the same taxonomy term. |
int[]|string |
$excluded_terms |
Array of excluded term IDs. Empty string if none were provided. |
string |
$taxonomy |
Taxonomy. Used to identify the term used when `$in_same_term` is true. |
WP_Post |
$post |
WP_Post object. |
PHP Doc
/**
* Filters the JOIN clause in the SQL for an adjacent post query.
*
* The dynamic portion of the hook name, `$adjacent`, refers to the type
* of adjacency, 'next' or 'previous'.
*
* Possible hook names include:
*
* - `get_next_post_join`
* - `get_previous_post_join`
*
* @since 2.5.0
* @since 4.4.0 Added the `$taxonomy` and `$post` parameters.
*
* @param string $join The JOIN clause in the SQL.
* @param bool $in_same_term Whether post should be in the same taxonomy term.
* @param int[]|string $excluded_terms Array of excluded term IDs. Empty string if none were provided.
* @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
* @param WP_Post $post WP_Post object.
*/